package com.cmas.platform.domain;

import lombok.Data;
import com.aidex.common.core.domain.BasePlusEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.aidex.common.utils.log.annotation.FieldRemark;
import com.aidex.common.utils.log.annotation.LogField;
import com.aidex.common.annotation.Excel;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

/**
 * 推送表对象 notification
 *
 * @author su
 * @email 1218819874@qq.com
 * @date 2024-05-14
 */
@Data
public class Notification extends BasePlusEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 内容内容主体ID
     */
    @Excel(name = "内容主体ID")
    @LogField
    @FieldRemark(name = "内容主体ID", field = "itemId")
    private String itemId;

    /**
     * 用户ID
     */
    @Excel(name = "用户ID")
    @LogField
    @FieldRemark(name = "用户ID", field = "userId")
    private String userId;


    /**
     * 地区ID
     */
    @Excel(name = "地区ID")
    @LogField
    @FieldRemark(name = "地区ID", field = "regionId")
    private String regionId;


    /** 通知标题 */
    @Excel(name = "通知标题")
    @LogField
    @FieldRemark(name = "通知标题",field = "title")
    @Size(max = 128, message = "帖子标题长度不能超过128个字符")
    private String title;

    /**
     * 通知内容
     */
    @Excel(name = "通知内容")
    @LogField
    @FieldRemark(name = "通知内容", field = "content")
    private String content;

    /**
     * 通知类型
     */
    @Excel(name = "通知类型")
    @LogField
    @FieldRemark(name = "通知类型", field = "type")
    @NotBlank(message = "通知类型不允许为空")
    private String type;

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("itemId", getItemId())
                .append("userId", getUserId())
                .append("regionId", getRegionId())
                .append("content", getContent())
                .append("type", getType())
                .append("remark", getRemark())
                .append("id", getId())
                .append("createBy", getCreateBy())
                .append("createDept", getCreateDept())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("updateIp", getUpdateIp())
                .append("version", getVersion())
                .append("delFlag", getDelFlag())
                .toString();
    }
}
